package com.example.java9.feature_03;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class TestListOf {

    public static void main(String[] args){

        //创建只读的list
        List<String> list = List.of("帝王神龟", "珠圆玉润");
        //删除元素会报错
        //list.remove(0);

        // 只读Set
        Set<String> set = Set.of("栖息地", "凤凰城");

        // 只读Map
        Map<String, String> map = Map.of("k1", "v1", "k2", "v2");
    }

}
